Optimal. Leaf size=353 \[ \frac {2 \sqrt {c+d \tan (e+f x)} \left (A \left (2 a c d+b \left (c^2-d^2\right )\right )+a \left (B c^2-B d^2-2 c C d\right )-b \left (2 B c d+c^2 C-C d^2\right )\right )}{f}+\frac {2 (a B+A b-b C) (c+d \tan (e+f x))^{5/2}}{5 f}+\frac {2 (c+d \tan (e+f x))^{3/2} (a A d+a B c-a C d+A b c-b B d-b c C)}{3 f}-\frac {(b+i a) (c-i d)^{5/2} (A-i B-C) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{f}+\frac {(-b+i a) (c+i d)^{5/2} (A+i B-C) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{f}-\frac {2 (-9 a C d-9 b B d+2 b c C) (c+d \tan (e+f x))^{7/2}}{63 d^2 f}+\frac {2 b C \tan (e+f x) (c+d \tan (e+f x))^{7/2}}{9 d f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 1.21, antiderivative size = 351, normalized size of antiderivative = 0.99, number of steps used = 12, number of rules used = 7, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.156, Rules used = {3637, 3630, 3528, 3539, 3537, 63, 208} \[ \frac {2 \sqrt {c+d \tan (e+f x)} \left (2 a A c d+a B \left (c^2-d^2\right )-2 a c C d+A b \left (c^2-d^2\right )-b \left (2 B c d+c^2 C-C d^2\right )\right )}{f}+\frac {2 (a B+A b-b C) (c+d \tan (e+f x))^{5/2}}{5 f}+\frac {2 (c+d \tan (e+f x))^{3/2} (a A d+a B c-a C d+A b c-b B d-b c C)}{3 f}-\frac {(b+i a) (c-i d)^{5/2} (A-i B-C) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{f}+\frac {(-b+i a) (c+i d)^{5/2} (A+i B-C) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{f}-\frac {2 (-9 a C d-9 b B d+2 b c C) (c+d \tan (e+f x))^{7/2}}{63 d^2 f}+\frac {2 b C \tan (e+f x) (c+d \tan (e+f x))^{7/2}}{9 d f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 63
Rule 208
Rule 3528
Rule 3537
Rule 3539
Rule 3630
Rule 3637
Rubi steps
\begin {align*} \int (a+b \tan (e+f x)) (c+d \tan (e+f x))^{5/2} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right ) \, dx &=\frac {2 b C \tan (e+f x) (c+d \tan (e+f x))^{7/2}}{9 d f}-\frac {2 \int (c+d \tan (e+f x))^{5/2} \left (\frac {1}{2} (2 b c C-9 a A d)-\frac {9}{2} (A b+a B-b C) d \tan (e+f x)+\frac {1}{2} (2 b c C-9 b B d-9 a C d) \tan ^2(e+f x)\right ) \, dx}{9 d}\\ &=-\frac {2 (2 b c C-9 b B d-9 a C d) (c+d \tan (e+f x))^{7/2}}{63 d^2 f}+\frac {2 b C \tan (e+f x) (c+d \tan (e+f x))^{7/2}}{9 d f}-\frac {2 \int (c+d \tan (e+f x))^{5/2} \left (\frac {9}{2} (b B-a (A-C)) d-\frac {9}{2} (A b+a B-b C) d \tan (e+f x)\right ) \, dx}{9 d}\\ &=\frac {2 (A b+a B-b C) (c+d \tan (e+f x))^{5/2}}{5 f}-\frac {2 (2 b c C-9 b B d-9 a C d) (c+d \tan (e+f x))^{7/2}}{63 d^2 f}+\frac {2 b C \tan (e+f x) (c+d \tan (e+f x))^{7/2}}{9 d f}-\frac {2 \int (c+d \tan (e+f x))^{3/2} \left (\frac {9}{2} d (b B c+b (A-C) d-a (A c-c C-B d))-\frac {9}{2} d (A b c+a B c-b c C+a A d-b B d-a C d) \tan (e+f x)\right ) \, dx}{9 d}\\ &=\frac {2 (A b c+a B c-b c C+a A d-b B d-a C d) (c+d \tan (e+f x))^{3/2}}{3 f}+\frac {2 (A b+a B-b C) (c+d \tan (e+f x))^{5/2}}{5 f}-\frac {2 (2 b c C-9 b B d-9 a C d) (c+d \tan (e+f x))^{7/2}}{63 d^2 f}+\frac {2 b C \tan (e+f x) (c+d \tan (e+f x))^{7/2}}{9 d f}-\frac {2 \int \sqrt {c+d \tan (e+f x)} \left (\frac {9}{2} d \left (a \left (c^2 C+2 B c d-C d^2-A \left (c^2-d^2\right )\right )+b \left (2 c (A-C) d+B \left (c^2-d^2\right )\right )\right )-\frac {9}{2} d \left (2 a A c d-2 a c C d+A b \left (c^2-d^2\right )+a B \left (c^2-d^2\right )-b \left (c^2 C+2 B c d-C d^2\right )\right ) \tan (e+f x)\right ) \, dx}{9 d}\\ &=\frac {2 \left (2 a A c d-2 a c C d+A b \left (c^2-d^2\right )+a B \left (c^2-d^2\right )-b \left (c^2 C+2 B c d-C d^2\right )\right ) \sqrt {c+d \tan (e+f x)}}{f}+\frac {2 (A b c+a B c-b c C+a A d-b B d-a C d) (c+d \tan (e+f x))^{3/2}}{3 f}+\frac {2 (A b+a B-b C) (c+d \tan (e+f x))^{5/2}}{5 f}-\frac {2 (2 b c C-9 b B d-9 a C d) (c+d \tan (e+f x))^{7/2}}{63 d^2 f}+\frac {2 b C \tan (e+f x) (c+d \tan (e+f x))^{7/2}}{9 d f}-\frac {2 \int \frac {\frac {9}{2} d \left (a \left (c^3 C+3 B c^2 d-3 c C d^2-B d^3-A \left (c^3-3 c d^2\right )\right )+b \left ((A-C) d \left (3 c^2-d^2\right )+B \left (c^3-3 c d^2\right )\right )\right )-\frac {9}{2} d \left (A \left (b c^3+3 a c^2 d-3 b c d^2-a d^3\right )-b \left (c^3 C+3 B c^2 d-3 c C d^2-B d^3\right )+a \left (B c^3-3 c^2 C d-3 B c d^2+C d^3\right )\right ) \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx}{9 d}\\ &=\frac {2 \left (2 a A c d-2 a c C d+A b \left (c^2-d^2\right )+a B \left (c^2-d^2\right )-b \left (c^2 C+2 B c d-C d^2\right )\right ) \sqrt {c+d \tan (e+f x)}}{f}+\frac {2 (A b c+a B c-b c C+a A d-b B d-a C d) (c+d \tan (e+f x))^{3/2}}{3 f}+\frac {2 (A b+a B-b C) (c+d \tan (e+f x))^{5/2}}{5 f}-\frac {2 (2 b c C-9 b B d-9 a C d) (c+d \tan (e+f x))^{7/2}}{63 d^2 f}+\frac {2 b C \tan (e+f x) (c+d \tan (e+f x))^{7/2}}{9 d f}+\frac {1}{2} \left ((a-i b) (A-i B-C) (c-i d)^3\right ) \int \frac {1+i \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx+\frac {1}{2} \left ((a+i b) (A+i B-C) (c+i d)^3\right ) \int \frac {1-i \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx\\ &=\frac {2 \left (2 a A c d-2 a c C d+A b \left (c^2-d^2\right )+a B \left (c^2-d^2\right )-b \left (c^2 C+2 B c d-C d^2\right )\right ) \sqrt {c+d \tan (e+f x)}}{f}+\frac {2 (A b c+a B c-b c C+a A d-b B d-a C d) (c+d \tan (e+f x))^{3/2}}{3 f}+\frac {2 (A b+a B-b C) (c+d \tan (e+f x))^{5/2}}{5 f}-\frac {2 (2 b c C-9 b B d-9 a C d) (c+d \tan (e+f x))^{7/2}}{63 d^2 f}+\frac {2 b C \tan (e+f x) (c+d \tan (e+f x))^{7/2}}{9 d f}+\frac {\left ((a-i b) (i A+B-i C) (c-i d)^3\right ) \operatorname {Subst}\left (\int \frac {1}{(-1+x) \sqrt {c-i d x}} \, dx,x,i \tan (e+f x)\right )}{2 f}-\frac {\left ((i a-b) (A+i B-C) (c+i d)^3\right ) \operatorname {Subst}\left (\int \frac {1}{(-1+x) \sqrt {c+i d x}} \, dx,x,-i \tan (e+f x)\right )}{2 f}\\ &=\frac {2 \left (2 a A c d-2 a c C d+A b \left (c^2-d^2\right )+a B \left (c^2-d^2\right )-b \left (c^2 C+2 B c d-C d^2\right )\right ) \sqrt {c+d \tan (e+f x)}}{f}+\frac {2 (A b c+a B c-b c C+a A d-b B d-a C d) (c+d \tan (e+f x))^{3/2}}{3 f}+\frac {2 (A b+a B-b C) (c+d \tan (e+f x))^{5/2}}{5 f}-\frac {2 (2 b c C-9 b B d-9 a C d) (c+d \tan (e+f x))^{7/2}}{63 d^2 f}+\frac {2 b C \tan (e+f x) (c+d \tan (e+f x))^{7/2}}{9 d f}-\frac {\left ((a-i b) (A-i B-C) (c-i d)^3\right ) \operatorname {Subst}\left (\int \frac {1}{-1-\frac {i c}{d}+\frac {i x^2}{d}} \, dx,x,\sqrt {c+d \tan (e+f x)}\right )}{d f}-\frac {\left ((a+i b) (A+i B-C) (c+i d)^3\right ) \operatorname {Subst}\left (\int \frac {1}{-1+\frac {i c}{d}-\frac {i x^2}{d}} \, dx,x,\sqrt {c+d \tan (e+f x)}\right )}{d f}\\ &=-\frac {(i a+b) (A-i B-C) (c-i d)^{5/2} \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{f}+\frac {(i a-b) (A+i B-C) (c+i d)^{5/2} \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{f}+\frac {2 \left (2 a A c d-2 a c C d+A b \left (c^2-d^2\right )+a B \left (c^2-d^2\right )-b \left (c^2 C+2 B c d-C d^2\right )\right ) \sqrt {c+d \tan (e+f x)}}{f}+\frac {2 (A b c+a B c-b c C+a A d-b B d-a C d) (c+d \tan (e+f x))^{3/2}}{3 f}+\frac {2 (A b+a B-b C) (c+d \tan (e+f x))^{5/2}}{5 f}-\frac {2 (2 b c C-9 b B d-9 a C d) (c+d \tan (e+f x))^{7/2}}{63 d^2 f}+\frac {2 b C \tan (e+f x) (c+d \tan (e+f x))^{7/2}}{9 d f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 5.36, size = 324, normalized size = 0.92 \[ \frac {\frac {63}{2} i d (a-i b) (A-i B-C) \left (\frac {2}{5} (c+d \tan (e+f x))^{5/2}+\frac {2}{3} (c-i d) \left (\sqrt {c+d \tan (e+f x)} (4 c+d \tan (e+f x)-3 i d)-3 (c-i d)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )\right )\right )-\frac {63}{2} i d (a+i b) (A+i B-C) \left (\frac {2}{5} (c+d \tan (e+f x))^{5/2}+\frac {2}{3} (c+i d) \left (\sqrt {c+d \tan (e+f x)} (4 c+d \tan (e+f x)+3 i d)-3 (c+i d)^{3/2} \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )\right )\right )+\frac {2 (9 a C d+9 b B d-2 b c C) (c+d \tan (e+f x))^{7/2}}{d}+14 b C \tan (e+f x) (c+d \tan (e+f x))^{7/2}}{63 d f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.52, size = 7402, normalized size = 20.97 \[ \text {output too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F(-1)] time = 0.00, size = -1, normalized size = -0.00 \[ \text {Hanged} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \tan {\left (e + f x \right )}\right ) \left (c + d \tan {\left (e + f x \right )}\right )^{\frac {5}{2}} \left (A + B \tan {\left (e + f x \right )} + C \tan ^{2}{\left (e + f x \right )}\right )\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________